#!/bin/bash
#### Execute  ./makeall to build all variants of this bootloader
#### run $ chmod +x if this file isn't executable.

make clean

# ATmega8535
make atmega8535 AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega8535 AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega8535 AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega8535 AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2
make atmega8535 AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega8535 AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2
make atmega8535 AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B0 LED_START_FLASHES=2
make atmega8535 AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega8535 AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B0 LED_START_FLASHES=2

# ATmega8515
make atmega8515 AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega8515 AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega8515 AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega8515 AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2
make atmega8515 AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega8515 AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2
make atmega8515 AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B0 LED_START_FLASHES=2
make atmega8515 AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega8515 AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B0 LED_START_FLASHES=2

# ATmega6490P
make atmega6490p AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega6490p AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega6490p AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega6490p AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega6490p AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega6490p AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega6490p AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega6490p AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega6490p AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT

# ATmega6490
make atmega6490 AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega6490 AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega6490 AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega6490 AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega6490 AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega6490 AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega6490 AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega6490 AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega6490 AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT

# ATmega3290P
make atmega3290p AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega3290p AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega3290p AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega3290p AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2
make atmega3290p AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega3290p AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2
make atmega3290p AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B5 LED_START_FLASHES=2
make atmega3290p AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega3290p AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B5 LED_START_FLASHES=2

# ATmega3290
make atmega3290 AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega3290 AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega3290 AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega3290 AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2
make atmega3290 AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega3290 AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2
make atmega3290 AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B5 LED_START_FLASHES=2
make atmega3290 AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega3290 AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B5 LED_START_FLASHES=2

# ATmega2561
make atmega2561 AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega2561 AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega2561 AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega2561 AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega2561 AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega2561 AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega2561 AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega2561 AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega2561 AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT

# ATmega2560
make atmega2560 AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT
make atmega2560 AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT
make atmega2560 AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT
make atmega2560 AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT
make atmega2560 AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT
make atmega2560 AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT
make atmega2560 AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT
make atmega2560 AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT
make atmega2560 AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT

# ATmega1284P
make atmega1284p AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega1284p AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega1284p AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega1284p AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega1284p AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega1284p AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega1284p AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega1284p AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega1284p AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT

# ATmega1284
make atmega1284 AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega1284 AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega1284 AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega1284 AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega1284 AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega1284 AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega1284 AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega1284 AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega1284 AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT

# ATmega1281
make atmega1281 AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega1281 AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega1281 AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega1281 AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega1281 AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega1281 AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega1281 AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega1281 AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega1281 AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT

# ATmega1280
make atmega1280 AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT
make atmega1280 AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT
make atmega1280 AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT
make atmega1280 AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT
make atmega1280 AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT
make atmega1280 AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT
make atmega1280 AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT
make atmega1280 AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT
make atmega1280 AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT

# ATmega649P
make atmega649p AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega649p AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega649p AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega649p AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega649p AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega649p AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega649p AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega649p AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega649p AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT

# ATmega649
make atmega649 AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega649 AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega649 AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega649 AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega649 AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega649 AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega649 AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega649 AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega649 AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT

# ATmega644P/PA
make atmega644p AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega644p AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega644p AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega644p AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega644p AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega644p AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega644p AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega644p AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega644p AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT

# ATmega644/A
make atmega644 AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega644 AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega644 AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega644 AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega644 AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega644 AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega644 AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega644 AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT
make atmega644 AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B0 LED_START_FLASHES=2 -BIGBOOT

# ATmega640
make atmega640 AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT
make atmega640 AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT
make atmega640 AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT
make atmega640 AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT
make atmega640 AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT
make atmega640 AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT
make atmega640 AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT
make atmega640 AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT
make atmega640 AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B7 LED_START_FLASHES=2 -BIGBOOT

# ATmega329P
make atmega329p AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega329p AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega329p AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega329p AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2
make atmega329p AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega329p AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2
make atmega329p AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B5 LED_START_FLASHES=2
make atmega329p AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega329p AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B5 LED_START_FLASHES=2

# ATmega329
make atmega329 AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega329 AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega329 AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega329 AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2
make atmega329 AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega329 AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2
make atmega329 AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B5 LED_START_FLASHES=2
make atmega329 AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega329 AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B5 LED_START_FLASHES=2

# ATmega328P
make atmega328p AVR_FREQ=16000000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega328p AVR_FREQ=20000000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega328p AVR_FREQ=18432000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega328p AVR_FREQ=12000000L BAUD_RATE=57600 LED=B5 LED_START_FLASHES=2
make atmega328p AVR_FREQ=8000000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2 
make atmega328p AVR_FREQ=8000000L BAUD_RATE=57600 LED=B5 LED_START_FLASHES=2 
make atmega328p AVR_FREQ=8000000L BAUD_RATE=38400 LED=B5 LED_START_FLASHES=2 
make atmega328p AVR_FREQ=8000000L BAUD_RATE=19200 LED=B5 LED_START_FLASHES=2 
make atmega328p AVR_FREQ=1000000L BAUD_RATE=9600 LED=B5 LED_START_FLASHES=2

# ATmega328
make atmega328 AVR_FREQ=16000000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega328 AVR_FREQ=20000000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega328 AVR_FREQ=18432000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega328 AVR_FREQ=12000000L BAUD_RATE=57600 LED=B5 LED_START_FLASHES=2
make atmega328 AVR_FREQ=8000000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2 
make atmega328 AVR_FREQ=8000000L BAUD_RATE=57600 LED=B5 LED_START_FLASHES=2 
make atmega328 AVR_FREQ=8000000L BAUD_RATE=38400 LED=B5 LED_START_FLASHES=2 
make atmega328 AVR_FREQ=8000000L BAUD_RATE=19200 LED=B5 LED_START_FLASHES=2
make atmega328 AVR_FREQ=1000000L BAUD_RATE=9600 LED=B5 LED_START_FLASHES=2

# ATmega324P
make atmega324p AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega324p AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega324p AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega324p AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2
make atmega324p AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega324p AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2
make atmega324p AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B0 LED_START_FLASHES=2
make atmega324p AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega324p AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B0 LED_START_FLASHES=2

# ATmega324PA
make atmega324pa AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega324pa AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega324pa AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega324pa AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2
make atmega324pa AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega324pa AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2
make atmega324pa AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B0 LED_START_FLASHES=2
make atmega324pa AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega324pa AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B0 LED_START_FLASHES=2

# ATmega324A
make atmega324a AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega324a AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega324a AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega324a AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2
make atmega324a AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega324a AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2
make atmega324a AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B0 LED_START_FLASHES=2
make atmega324a AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega324a AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B0 LED_START_FLASHES=2

# ATmega169P
make atmega169p AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega169p AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega169p AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega169p AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2
make atmega169p AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega169p AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2
make atmega169p AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B5 LED_START_FLASHES=2
make atmega169p AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega169p AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B5 LED_START_FLASHES=2

# ATmega169
make atmega169 AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega169 AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega169 AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega169 AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2
make atmega169 AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega169 AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2
make atmega169 AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B5 LED_START_FLASHES=2
make atmega169 AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B5 LED_START_FLASHES=2
make atmega169 AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B5 LED_START_FLASHES=2

# ATmega168
make atmega168p AVR_FREQ=16000000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega168p AVR_FREQ=20000000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega168p AVR_FREQ=18432000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega168p AVR_FREQ=12000000L BAUD_RATE=57600 LED=B5 LED_START_FLASHES=2
make atmega168p AVR_FREQ=8000000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega168p AVR_FREQ=8000000L BAUD_RATE=57600 LED=B5 LED_START_FLASHES=2
make atmega168p AVR_FREQ=8000000L BAUD_RATE=38400 LED=B5 LED_START_FLASHES=2
make atmega168p AVR_FREQ=8000000L BAUD_RATE=19200 LED=B5 LED_START_FLASHES=2
make atmega168p AVR_FREQ=1000000L BAUD_RATE=9600 LED=B5 LED_START_FLASHES=2

# ATmega168
make atmega168 AVR_FREQ=16000000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega168 AVR_FREQ=20000000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega168 AVR_FREQ=18432000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega168 AVR_FREQ=12000000L BAUD_RATE=57600 LED=B5 LED_START_FLASHES=2
make atmega168 AVR_FREQ=8000000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega168 AVR_FREQ=8000000L BAUD_RATE=57600 LED=B5 LED_START_FLASHES=2
make atmega168 AVR_FREQ=8000000L BAUD_RATE=38400 LED=B5 LED_START_FLASHES=2
make atmega168 AVR_FREQ=8000000L BAUD_RATE=19200 LED=B5 LED_START_FLASHES=2
make atmega168 AVR_FREQ=1000000L BAUD_RATE=9600 LED=B5 LED_START_FLASHES=2

# ATmega164P/PA
make atmega164p AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega164p AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega164p AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega164p AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2
make atmega164p AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega164p AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2
make atmega164p AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B0 LED_START_FLASHES=2
make atmega164p AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega164p AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B0 LED_START_FLASHES=2

# ATmega164A
make atmega164a AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega164a AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega164a AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega164a AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2
make atmega164a AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega164a AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2
make atmega164a AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B0 LED_START_FLASHES=2
make atmega164a AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega164a AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B0 LED_START_FLASHES=2

# ATmega162
make atmega162 AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega162 AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega162 AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega162 AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2
make atmega162 AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega162 AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2
make atmega162 AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B0 LED_START_FLASHES=2
make atmega162 AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega162 AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B0 LED_START_FLASHES=2

# ATmega128/A
make atmega128 AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega128 AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega128 AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega128 AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega128 AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega128 AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega128 AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega128 AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega128 AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT

# ATmega88P
make atmega88p AVR_FREQ=16000000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega88p AVR_FREQ=20000000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega88p AVR_FREQ=18432000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega88p AVR_FREQ=12000000L BAUD_RATE=57600 LED=B5 LED_START_FLASHES=2
make atmega88p AVR_FREQ=8000000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega88p AVR_FREQ=8000000L BAUD_RATE=57600 LED=B5 LED_START_FLASHES=2
make atmega88p AVR_FREQ=8000000L BAUD_RATE=38400 LED=B5 LED_START_FLASHES=2
make atmega88p AVR_FREQ=8000000L BAUD_RATE=19200 LED=B5 LED_START_FLASHES=2
make atmega88p AVR_FREQ=1000000L BAUD_RATE=9600 LED=B5 LED_START_FLASHES=2

# ATmega88
make atmega88 AVR_FREQ=16000000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega88 AVR_FREQ=20000000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega88 AVR_FREQ=18432000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega88 AVR_FREQ=12000000L BAUD_RATE=57600 LED=B5 LED_START_FLASHES=2
make atmega88 AVR_FREQ=8000000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega88 AVR_FREQ=8000000L BAUD_RATE=57600 LED=B5 LED_START_FLASHES=2
make atmega88 AVR_FREQ=8000000L BAUD_RATE=38400 LED=B5 LED_START_FLASHES=2
make atmega88 AVR_FREQ=8000000L BAUD_RATE=19200 LED=B5 LED_START_FLASHES=2
make atmega88 AVR_FREQ=1000000L BAUD_RATE=9600 LED=B5 LED_START_FLASHES=2

# ATmega64/A
make atmega64 AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega64 AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega64 AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega64 AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega64 AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega64 AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega64 AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega64 AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT
make atmega64 AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B5 LED_START_FLASHES=2 -BIGBOOT

# ATmega32/A
make atmega32 AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega32 AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega32 AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega32 AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2
make atmega32 AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega32 AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2
make atmega32 AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B0 LED_START_FLASHES=2
make atmega32 AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega32 AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B0 LED_START_FLASHES=2

# ATmega16/A
make atmega16 AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega16 AVR_FREQ=20000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega16 AVR_FREQ=18432000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega16 AVR_FREQ=12000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2
make atmega16 AVR_FREQ=8000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega16 AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2
make atmega16 AVR_FREQ=8000000L BAUD_RATE=38400 UART=0 LED=B0 LED_START_FLASHES=2
make atmega16 AVR_FREQ=8000000L BAUD_RATE=19200 UART=0 LED=B0 LED_START_FLASHES=2
make atmega16 AVR_FREQ=1000000L BAUD_RATE=9600 UART=0 LED=B0 LED_START_FLASHES=2

# ATmega8/A
make atmega8 AVR_FREQ=16000000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega8 AVR_FREQ=20000000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega8 AVR_FREQ=18432000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega8 AVR_FREQ=12000000L BAUD_RATE=57600 LED=B5 LED_START_FLASHES=2
make atmega8 AVR_FREQ=8000000L BAUD_RATE=115200 LED=B5 LED_START_FLASHES=2
make atmega8 AVR_FREQ=8000000L BAUD_RATE=57600 LED=B5 LED_START_FLASHES=2
make atmega8 AVR_FREQ=8000000L BAUD_RATE=38400 LED=B5 LED_START_FLASHES=2
make atmega8 AVR_FREQ=8000000L BAUD_RATE=19200 LED=B5 LED_START_FLASHES=2
make atmega8 AVR_FREQ=1000000L BAUD_RATE=9600 LED=B5 LED_START_FLASHES=2


make clean_asm